/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2021-10-22     hehung       the first version
 */
#ifndef APPLICATIONS_APP_KEY_H_
#define APPLICATIONS_APP_KEY_H_

#include "stdint.h"

typedef enum
{
    KEY_PRESSED  = 0u,
    KEY_RELEASED = 1u,
    KEY_UNKNOW   = 2u
} E_KeySt;


#define KEY_NUM                           (3u)
#define KEY_NUM_1                         (0u)
#define KEY_NUM_2                         (1u)
#define KEY_NUM_3                         (2u)

#define KEY_SW_FILTER_THD                 (4u)

#define KEY_SAMPLE_PERIOD                 (10u)
#define KEY_HOLD_SHORT_TIME               (500u) /*ms*/
#define KEY_HOLD_MIDDLE_TIME              (1500u) /*ms*/
#define KEY_HOLD_LONG_TIME                (1500u) /*ms*/


extern E_KeySt KEY_GetKeyStatus(uint8_t paraKeyNum);
extern E_KeySt KEY_GetKeyPressedStatus(uint8_t paraKeyNum);

void KEY_AppInit(void);


#endif /* APPLICATIONS_APP_KEY_H_ */
